<template>
  <div class="sousuo">
      <!-- <van-icon name="search" class="sea" />
    <input type="text"   placeholder="请输入小区或地址">
    <span @click="quxiao" class="quxiao">取消</span> -->
    <form action="/">
  <van-search
    show-action
    placeholder="请输入小区或地址"
    @search="onSearch"
    @cancel="onCancel"
  />
    </form>
  </div>
</template>

<script>
import { getXiaoqu } from '@/api/user'
export default {
  methods: {
    onSearch (val) {
      // Toast(val)
    },
    onCancel () {
      // Toast('取消')
      this.$router.push('/gochuzu')
    }
  },
  async created () {
    const data = await getXiaoqu()
    console.log(data)
  }
}
</script>
<style>
.sousuo{
    position: fixed;
    top: 15px;
    left: 20px;
   width: 350px;
   margin-right: 50px;
   height: 30px;
   background-color: #fff;
   line-height: 30px;
  }
  .quxiao{
    position: fixed;
      top: 20px;
      right: 10px;
      font-size: 16px;
      color: rgb(107, 112, 114);
  }
  .sea{
     position: fixed;
top:30px
  }

</style>
